package com.qianli.cashmama.trade.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.google.common.collect.Maps;
import com.qianli.cashmama.trade.dao.TServiceTradeDao;
import com.qianli.cashmama.trade.entity.TServiceTradeEntity;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
* User: xulin
* Date: 2020-12-29
* Time: 10:09:17.670
*/

@Repository
public class TServiceTradeDaoImpl extends AbstractBaseMapper<TServiceTradeEntity> implements TServiceTradeDao {


    @Override
    public TServiceTradeEntity selectByServiceNo(String serviceNo) {
        Map param = Maps.newHashMap();
        param.put("serviceNo", serviceNo);
        return getSqlSession().selectOne(getStatement("selectByServiceNo"), param);
    }

    @Override
    public List<TServiceTradeEntity> selectByUserCodeAndStatus(String userCode, Integer serviceStatus) {
        Map param = Maps.newHashMap();
        param.put("userCode", userCode);
        param.put("serviceStatus", serviceStatus);
        return getSqlSession().selectList(getStatement("selectByUserCodeAndStatus"), param);
    }
}